import request from '@/utils/request'

export function getAllGoods(data) {
  return request({
    url: '/goods/all',
    method: 'post',
    data: data
  })
}
export function getAllAgents(data) {
  return request({
    url: '/goods/allAgents',
    method: 'post',
    data: data
  })
}
export function getAllSuppier(data) {
  return request({
    url: '/goods/allSuppier',
    method: 'post',
    data: data
  })
}
export function getAllTypes() {
  return request({
    url: '/goods/allTypes',
    method: 'get'
  })
}
export function deleteOne(data) {
  return request({
    url: '/goods/delete',
    method: 'delete',
    data: data
  })
}
export function deleteMulti(data) {
  return request({
    url: '/goods/delete/multi',
    method: 'delete',
    data: data
  })
}
export function updateOne(data) {
  return request({
    url: '/goods/update',
    method: 'put',
    data: data
  })
}
export function countGood() {
  return request({
    url: '/goods/count',
    method: 'get'
  })
}
export function searchGood(gname) {
  return request({
    url: '/goods/search/'+gname,
    method: 'get'
  })
}
export function getDayExp() {
  return request({
    url: '/goods/goodExp',
    method: 'get'
  })
}
export function getExpGood() {
  return request({
    url: '/goods/expGood',
    method: 'get'
  })
}
